package exception

// 此文件定义 携带状态码的业务异常

// code--404的业务异常，找不到查询结果
func NewNotFound(format string, a ...any) *ApiException {
	return NewApiException(404, format, a...)
}

// code--5000的业务异常，token认证失败
func NewAuthFailed(format string, a ...any) *ApiException {
	return NewApiException(5000, format, a...)
}

// code--5001的业务异常，token时间过期
func NewTokenExpired(format string, a ...any) *ApiException {
	return NewApiException(5001, format, a...)
}

// 鉴权失败的异常
func NewPermissionDeny(format string, a ...any) *ApiException {
	return NewApiException(5100, format, a...)
}
